import request from '@/utils/request'
// 机构树接口
export function orgTree(data,flag){
   return request({
        url:`/pc/org/page?flag=${flag.data}`,
        method:'post',
        data
    })
}

// 新增
export function orgadd(data,flag){
    return request({
        url:`/pc/org/add?flag=${flag.data}`,
        method:'post',
        data
    })
}

// 获取机构详情
export function orginfo(data,flag){
    return request({
        url:`/pc/org/detail?flag=${flag.data}`,
        method:"get",
        params:data
    })
}
// 修改
export function orgupdate(data,flag){
    return request({
        url:`/pc/org/update?flag=${flag.data}`,
        method:'post',
        data
    })
}
// 删除
export function orgdel(data,flag){
    return request({
        url:`/pc/org/del?id=${data.id}&flag=${flag.data}`,
        method:'get'
    })
}
